<div class="animated" ng-class="{true: 'fadeInRight', false:'fadeInLeft'}[currentAnimated]">
  <div class="panel panel-default">
    <div class="panel-heading">
      <a ng-click="discard()" href="javascript:;"><i class="backBtn fa fa-arrow-circle-left"></i></a>
      <span class="panelTitle" ng-bind="ResourceForm.title"></span>
    </div>
  <div class="panel-body">
    <div class="row search-area">
      <div class="col-xs-6 col-md-6">
        <div class="btn-group" role="group">
          <a ui-sref=".add" class="btn btn-default" title="新增"><i class="fa fa-plus-circle"></i><span class="hidden-xs">新增</span></a>
          <a ng-click="remove()" class="btn btn-default" title="删除"><i class="fa fa-times-circle"></i><span class="hidden-xs">删除</span></a>
        </div>
      </div>

      <div class="col-xs-6 col-md-6">
        <form class="form-inline pull-right">
          <div class="input-group" >
            <input class="form-control" type="text" ng-model="resources.resourceName" placeholder="资源名称">
            <span class="input-group-btn">
              <button class="btn btn-primary" type="button" ng-click="search()"><i class="fa fa-search"></i><span class="hidden-xs">搜索</span></button>
            </span>
          </div>
          <!-- <a class="btn btn-default" data-toggle="modal" data-backdrop="static" data-target="#advancedSearch"><i class="fa fa-filter"></i><span class="hidden-xs">高级搜索</span></a> -->
        </form>
      </div>
    </div>
    <div class="row">
      <div class="col-xs-12 col-md-12">
        <div ui-grid="gridOptions" ui-grid-selection ui-grid-pagination ui-grid-resize-columns ui-grid-move-columns class="grid"></div>
      </div>
    </div>
  </div>
</div>

<div class="modal" id="advancedSearch" tabindex="-1" role="dialog" aria-hidden="true">
  <div class="modal-dialog modal-lg">
    <div class="modal-content">
       <div class="modal-header">
          <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
          <h4 class="modal-title">高级搜索</h4>
       </div>
       <div class="modal-body">
          <div class="row">
            <div class="col-xs-12 col-md-12">
              <form class="form-horizontal searchForm" role="form" name="resourcesForm" >
                <div class="col-xs-6 col-md-6">
                  <div class="form-group">
                    <label class="control-label hidden-xs hidden-sm col-md-3">资源名称：</label>
                    <div class="col-xs-12 col-md-9">
                      <input type="text" class="form-control" name="resourceName" placeholder="资源名称" ng-model="resources.resourceName">
                    </div>
                  </div>
                </div>
                <div class="col-xs-6 col-md-6">
                  <div class="form-group">
                    <label class="control-label hidden-xs hidden-sm col-md-3">创建时间：</label>
                    <div class="col-xs-12 col-md-9">
                      <input type="text" class="form-control fl w120" id="beginCreateTime" name="beginCreateTime" placeholder="创建起始" idate ng-model="resources.beginCreateTime">
                      <em class="fl spitter">--</em>
                      <input type="text" class="form-control fl w120" id="endCreateTime" name="endCreateTime" placeholder="创建截止" idate ng-model="resources.endCreateTime">
                    </div>
                  </div>
                </div>
              </form>
            </div>
          </div>
       </div>
       <div class="modal-footer">
          <button type="button" class="btn btn-primary" ng-click="search()" data-dismiss="modal">搜索</button>
          <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
       </div>
    </div>
  </div>
</div>

<script type="text/javascript">
$('#advancedSearch').on('shown.bs.modal', function () {
  $(".modal-backdrop").css({"position": "static"});
}).on('hidden.bs.modal', function(){
  $(".modal-backdrop").css({"position" : "fixed"});
});
</script>